package com.example.modelrepositorydemo.Service;

public class VersionMetadataServiceImpl implements VersionMetadataService {

    private final VersionMetadataRepository versionMetadataRepository;

    public VersionMetadataServiceImpl(VersionMetadataRepository versionMetadataRepository) {
        this.versionMetadataRepository = versionMetadataRepository;
    }

    @Override
    public VersionMetadata getMetadata(String uuid, String key) {
        return versionMetadataRepository.findByUuidAndKey(uuid, key)
                .orElseThrow(() -> new NotFoundException("Metadata not found for uuid: " + uuid + " and key: " + key));
    }
}